<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>资讯中心</title>
  <link rel="stylesheet" href="__PUBLIC__/css/news.css">
</head>
<body>
<div class="container">
    <include file="./Home/Tpl/public/header.html" />
  <div class="banner">
	<img src="__PUBLIC__/images/cases_banner.gif" alt="">
  </div>
  <div class="main">
	<div class="main_title">
	  <a href="index.php">首页</a>
	  <span>></span>
	  <a>资讯中心</a>
	</div>
	<?php foreach ($news as $value) { ?>
	  <div class="main_content">
		<h2><?php echo $value['title']; ?><span>发布日期 : <?php echo date('Y-m-d', $value['date']); ?></span></h2>

		<p class="p_text">{$value['content']|strip_tags|str_cut=0,100}</p>
		<p>
		  <a href="{:U('News/news_detail?id='.$value['nid'])}" name="action" value="action">阅读全文...</a>
		</p>

	  </div>
	<?php } ?>
	<div class="main_next">
	  <div class="page_list">
		<ul>
		  <?php if ($nid > 1) { ?>
			<li>
			  <a href="news.php?nid=1">首页</a>
			</li>
		  <?php } ?>
		  <li>
			<a href="news.php?nid=<?php if ($nid > 1) {
			  echo $nid - 1;
			} else {
			  echo 1;
			} ?>">上一页</a>
		  </li>
		  <?php $i = 1;
		  while ($i <= $page) { ?>
			<li>
			  <a href="news.php?nid=<?php echo $i; ?>"><?php echo $i; ?></a>
			</li>
			<?php $i++;
		  } ?>
		  <li>
			<a href="news.php?nid=<?php if ($nid + 1 <= $page) {
			  echo $nid + 1;
			} else {
			  echo $page;
			} ?>">下一页</a>
		  </li>
		  <li>
			<a href="">共<?php echo $page; ?>页/<?php echo $count; ?>条</a>
		  </li>
		  <?php if ($nid < $page) { ?>
			<li>
			  <a href="news.php?nid=<?php echo $page; ?>">最后一页</a>
			</li>
		  <?php } ?>
		</ul>
	  </div>
	</div>
  </div>
    <include file="./Home/Tpl/public/footer.html" />
</div>
</body>
</html>